// import axios from 'axios'
// axios.defaults.baseURL = process.env.VUE_APP_URL
import request from '../utils/request'

export function authorizationspost (data) {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data: data
  })
}
export function userprofile () {
  return request({
    url: '/v1_0/user/profile'
  })
}
export function Channels () {
  return request({
    url: '/v1_0/channels'
  })
}
export function Mparticles (params) {
  return request({
    url: '/v1_0/mp/articles',
    params
  })
}
export function Mparticlespost (data, draft) {
  return request({
    url: '/v1_0/mp/articles',
    method: 'post',
    params: {
      draft: draft
    },
    data
  })
}
export function MparticlesDelete (id) {
  return request({
    url: '/v1_0/mp/articles/' + id,
    method: 'delete'
  })
}
export function MparticlesGet (id) {
  return request({
    url: '/v1_0/mp/articles/' + id
  })
}
export function MpArticlesPut (data, draft) {
  return request({
    url: '/v1_0/mp/articles/' + data.id,
    method: 'put',
    params: {
      draft: draft
    },
    data
  })
}
